home *** CD-ROM | disk | FTP | other *** search
-
-
- Brush Maps. Second in a series about adding personal touches to
- your Imagine objects. I'm sure this is the one that is more useful,
- since brush maps are inherently confusing.
-
-
- -Steve
-
-
- ------------------------------------------------------------------------------
-
-
- Textures are not the only way to add detail to an object. A more direct,
- less elegant, but more personallizable method is to use brush maps. Brush
- maps are ways of taking standard Amiga pictures (sometimes called IFFs,
- though pictures are a subset of the Interchange File Format) that can be
- placed "by hand" on your object. In its easiest incarnation, you could brush
- map a picture of your face onto a flat plane, put a frame (using wood
- texture! ) around it, and you have a virtual art piece. In its most complex
- incarnation, you could take a set of 40 256-level intensity maps saved as
- IFF24s and tile them endlessly on a plane during a 40 frame anim, and have
- the map pixel intensity create reflections and highlights from the flat
- plane just like it was really an animated, wind-wave covered ocean.
-
- Brush maps can give objects the same four characteristics that textures can-
- surface color, reflection, transparency, and surface orientation. Going back
- to the "my face in a frame" example, a color map is straightforward. A
- reflection map will reflect the color and intensity of light corresponding
- to the map- in other words, a black map would make the picture in the frame
- reflect no light, a white map would make the picture a mirror, and a yellow
- map would make only yellow light reflect. [The yellow example is not
- strictly true.. the yellow-mirror would reflect green and red light, which
- combine to make yellow]. Transparency (really filter) is similar. Black is
- opaque, pure white is the clearest crystal, and yellow would let yellow
- light though. An example given by Rick Rodriguez in his manual is that a
- filter map of your face applied to a plane would be like a stained-glass
- window. You could have fun with that. Note that transparent objects have an
- index of refraction, which is set in the attributes requester. See my
- article, "The Art of Glass" for a much more detailed discussion on
- transparency.
-
- The last brush type is altitude, which is a bit more tricky. Here, the
- IMAGINE MANUAL IS COMPLETELY WRONG! [Sorry, Rick!] The manual describes a
- "displacement map", which is somewhat similar. An altitude map just tells
- Imagine that light hitting the object's surface should be reflected,
- refracted, and specularated (!) as if it hit a surface that had a certain
- shape to it- the shape describedthe brushmap's intensity. If you mapped a
- picture with lots of small fuzzy grey dots onto a sphere, you would get
- reflections and light highlights as if the sphere had tiny pits in it like
- an orange. NOTE! The altitude map does NOT change the real surface height of
- your object at all. THIS is the difference between a displacement map and an
- altitude map.
-
- One option you should use if you're using transparency map is the "Full
- Scale Value" in the brush requester. This allows you to tell Imagine how
- transparent a pure white image should be. If you want pure white to be
- COMPLETELY transparent (invisible) set this number to 255 (full scale). If
- you set the number lower, you get full white to become opaque to whatever
- degree you wish. If you're making a stained glass window, you might want to
- set the number to 200 so that people can SEE that there is "glass" even
- where there is a clear pane. Impulse's old default was 245, I think.
-
- Any standard Amiga IFF can be used as a map. This includes all pictures
- savedDeluxe Paint, the most common picture editing program on the Amiga. A
- format of high color resolutions known as IFF24 saves three bytes of color
- information per pixel and produces beautiful color reproduction. These
- IFF24s can be producedthe ToasterPaint, Digi-view RGB saves (only 21 bits,
- but it is saved as 24 for compatibility), The Art Department, and many other
- graphics programs. The Art Department is the penultimate tool for
- manipulating 24-bit (and other) images- it can scale, compost, and
- manipulate 24-bit pictures painlessly, as long as you have RAM. [It is NOT a
- drawing program, though] Whatever type of brush you use, remember that
- Imagine can't do magic to your pictures- a 16 color picture of yourself is
- going to look positively cheesy compared to a 24-bit picture. For some
- applications, though, you don't need much more. Applying a 4-color logo to
- an object won't benefit by using a 16 million color brush - just use 4.
- Also, higher resolution is obviously higher quality, though it's pointless
- to use a 1000 by 1000 picture of a logo- even in a close-up shot, it would
- be indistinguishable from a 640 by 400 picture. Too low a resolution, though
- will be painfully obvious when you render. Depending on how close of a view
- you use in Imagine, you usually don't need more than 320 by 200. Again, this
- is very dependent on how close your camera view is. I've used 100 by 100
- brushes to great effect.
-
- A fun trick- Imagine can easily _OUTPUT_ IFF24s... you can use a previous
- rendering as a brush map.
-
- If you are truly interested in making high quality brush maps, you should
- definately use IFF24s as brushes. If you have DCTV, you have a terrific
- paintbox for editing pictures. Toasterpaint also works, but is not pleasant.
- If you don't have either (like me!), you can use a trick that works
- extremely well. I take a picture to be edited (often grabbed with
- Digiview!) and in Art Department size it to about 900 by 600 (this is very
- RAM limited... grey images can get 3 times as large). Then I display the
- picture in overscan dithered EHB, and save this image. Then I power up
- Deluxe Paint, and edit the picture. EHB gives you loads of colors to deal
- with, so you don't lose too much color resolution. [You do lose some!]
- DPaint can take brushmaps of any size [RAM limited!], and editing them is
- quite easy. With the very large scale, individual pixels don't matter much,
- so I use large brushes and the airbrush especially. When you're done
- editing, I save the picture, and use Art Department to resize the image back
- to its original size. For 24 bit pictures of a size of about 128 by 128, the
- quality is terrific! You can see some of the brushes I made posted to ab20
- and hubcap (the sidewalk and latticework, and my latest brick wall).
-
- Sources of hi-quality pictures are everywhere. Digi-view is your friend- it
- can make 768 by 480 resolution 24-bit pix. Toaster camera frame grabs will
- give you 24-bit pix at a resolution of 768 by 240. A fun source of varying
- quality images are GIFs. GIFs are a graphic picture format, most popular on
- MS-DOG computers. There are THOUSANDS of pictures, most with 256 colors out
- of 16 million. You can find about 1000 with a nice index on the anonymous
- FTP site wuarchive.wustl.edu. I often take these pix and shrink them by 1/2
- and save them as 24-bit IFFs- there's no color loss and the file size is
- much smaller.
-
- Once you have your map and know what you want to do with it, you have to
- place it on your object. The placement determines the size and orientation
- of the map, as well as how much of the object is influenced, and in the case
- of altitude maps, how much surface light is distorted.
-
- There are three basic types of wrap- a "flat" wrap (Flat X Flat Z), a
- "sphere" wrap (Wrap X Wrap Z), and a "cylinder" wrap (Flat X, Wrap Z and
- Wrap X, Flat Z). Flat will ignore any surface bumps and features and just
- apply itself directly, much like a slide projector would project onto a
- bumpy screen. A sphere wrap tries to encase the object in the brush, then
- shrinkwrap the map onto all of the surface features of the object. The
- cylinder wrap tries to follow contours in one direction, but ignore them in
- another. Think of taking a piece of gift wrap, and bending it around so its
- a hollow cylinder. Then place the object in the center of this vertical
- gift wrap cylinder and push IN (but not up or down!) to follow the object
- contours.
-
- Placing the maps is sometimes tricky. Mike Halvorson wrote a description
- that was posted about 6 weeks ago, you can find it in the Imagine list
- archives. Also, the green Impulse Winter 1991 bulletin had two very useful
- diagrams. What I'm about to describe is not as simple and foolproof as just
- looking at the 4 simple pictures they printed, due to the mere fact that
- ASCII graphics suck. But I'll try!
-
- FLAT "WRAPS"
-
- Flat wraps are the most common and certainly the most controllable of the
- brush map types. Think of having a decal or poster that you want to stick
- onto a wall. Flat wrapping will do just this. A good example is trying to
- put a logo onto the side of a truck- an excellent example of where brush
- maps shine.
-
- First, you should obviously have your logo picture and truck designed and
- ready. Now, to place the brush onto an object, you should probably use the
- "Edit Axes" mode. This lets you move the axes with the same mouse and
- keyboard commands that you normally use for objects... m for move, s for
- scale, r for rotate, x,y,and z to toggle a direction.
-
- A danger with editing brush axes is that you want to be in LOCAL mode,
- especially when you are scaling the brush axis in just one direction (like
- you were trying to increase its height, keeping the same width and depth.)
- If you don't scale in LOCAL mode, sometimes your changes don't stick. You
- can check by selecting "Edit Axes" again to make sure nothing changes after
- you're done.
-
-
- The axis you are editing has a bit yellow bounding box that is very
- deceiving. THE AREA WHERE THE BRUSH IS ACTUALLY MAPPED IS JUST THE UPPER
- RIGHT QUADRANT OF THIS BOX. The brush is placed with its lower left corner
- right at the center of the axes, and its upper right corner at a point
- definedthe X and Z axes of the brush map axis. Got that?
-
- Z
- +----------^------------+ Front View
- | |xxxxxxxxxxxx|
- | |x Picture xx|
- | |xx Area xxxx|
- | |xxxxxxxxxxxx|
- | +------------> X
- | |
- | |
- | |
- | | <-brush map bounding box
- +-----------------------+
-
-
- You want to position the axes so that the upper-right quadrant lies exactly
- where you want your brush to lie. If you want your brush to cover the entire
- side of the truck, you'd probably want to make the brush a few extra pixels
- high and wide so that you don't accidentally get a border around the edge of
- your logo.
-
- The Y axis of the brush map is pretty important as well. It tells Imagine
- how DEEP to apply your brush. Basically, any part of the object that falls
- between the axis origin and the tip of the Y axis WILL be colored (or
- reflected, or whatever). For the truck, you'd want to move and scale the
- brush axis in the Y direction so that the Y axis line INTERSECTS one side of
- the truck but NOT the other. The intersected side of the truck would be
- within the influence of the brush map, whereas the other side of the truck
- would be left alone. If you scaled the Y axis to include both truck sides,
- the other side of the truck would get the brush map applied to it as well.
- [In fact, you'd see a mirror image of the brush on the other side, since
- you'd be looking at it in the other direction.]
-
- Here's a terrible ASCII drawing showing how you'd position a brush so that
- it puts a very small logo on the side of a big rectangular solid, like a
- truck body.
-
- FRONT VIEW
-
-
- +-----------------------------------------+
- | | <-Truck body
- | |
- | |
- | ^ X |
- | | |
- | Brush | |
- | axis-> +-----> Z |
- | |
- | |
- | |
- | |
- +-----------------------------------------+
-
-
- ===============================================================
-
-
- TOP VIEW
-
- +-----------------------------------------+ <-Truck Body
- | |
- | |
- | |
- | |
- | |
- | ^ Y |
- | | |
- +------------------+----------------------+
- |
- Brush-> +-----> Z
- Axis
-
-
-
- See how the Y axis only intersects one side?
-
- That's about it for flat wrapping. It is pretty easy to control where
- the brush gets applied to any object.
-
-
- WRAP X WRAP Z WRAPS
-
- -----
-
- These are the most complex wraps. The Y axis here isn't really used,
- since the wrap is applied to the whole object surface, not just part.
-
- You want to position the axes so that the Z axis covers the entire height of
- the object... its height should be slightly TALLER than the object. The X
- axis should be thought as a "radius of influence"... it should be a little
- bit bigger than HALF the width of the object. The axis should be placed
- (LOOKING DOWN!!) at the center of the object, and looking from the side, at
- the bottom of the object. The Z axis should pass through and be slightly
- bigger than the object's height. The X axis should be slightly bigger than
- the object's maximum radius away from the center. The Y axis size doesn't
- matter. Keep it small, suggests Impulse.
-
-
- OK, Here's the diagram. The object is a sphere. I swear!
-
- ===========================================================
- FRONT VIEW
- ^ Z <- brush axis
- |
- __|__
- / | \
- - | -
- / | \
- / | \
- | | |
- | | |
- | | | <-Sphere-like object
- | | |
- \ | /
- \ | /
- - | -
- \ | /
- ---+--
- |
- +--------> X
-
-
- ===========================================================
- TOP VIEW
- _____
- / \
- - - <-Sphere-like object
- / \
- / \
- | ^ Y |
- | | |
- | +------+-> X
- | | Brush Axes
- | |
- \ /
- \ /
- - -
- \ /
- ------
-
-
-
- That's it! If you wrap a picture of a grid of lines, it will come
- out looking like latitude and longitude lines on a globe.
-
-
-
- CYLINDER WRAPS (WRAP X, FLAT Z, FLAT X, WRAP Z)
-
- The brush placement is identical to the placement used for the spherical
- wrap. The effect is quite different, however. If you tried cylinder wrapping
- the grid picture onto a sphere, you'd get OK latitude lines (going
- North-South) but the longitude lines would get further apart the closer you
- were to the poles, due to the flat projection of the horizontal lines. The
- lines themselves would also be wider at the poles.
-
-
- One last note for brush axis placement- for adding ALTITUDE maps, the Y axis
- depth is used to measure how much indentation a full scale range of
- intensity (0-255) should simulate. For cylinder and sphere wraps, just scale
- the Y axis. For orange pits, the axis might be 1% of the sphere's size. For
- an eroded planet, you might use 10%. More than this would make really stupid
- looking reflections. Altitude maps are subtle.
-
- The Y depth is also used for flat altitude wraps, which might limit you if
- you want to indent both sides of a truck. You'd have to use two brushes in
- this case. I would have preferred a number gadget in the brush requester.
-
- ----------
-
- Once you know how to place individual brushes, you can start with the fancy
- tricks. Brushes overlay each other just like textures. You can put up to 4
- brushes on an object, and they are applied in order. Many maps don't
- interfere, though- you could have a color map and a reflection map on the
- same object in the same place. Both will work just fine.
-
- I am not positive, but I'm pretty sure brushes are put on AFTER
- textures are applied. Otherwise you'd get wood grain on your face. :-)
-
- Repeating brushmaps are a joy. They "tile" an object with an endless
- succession of images both side to side and top to bottom. The brush will
- repeat all the way out the the end of the object. If you tile a ground, the
- brushes will go to infinity. The size of each tile is set by the brush axes,
- just like a non-tiled map. The brushes are placed next to each other with no
- space between them. You could draw a VERY detailed picture of a bathroom
- tile, and map it onto a wall. when rendered, the wall would be (surprise)
- tiled! I've used this to GREAT effect for making very detailed sidewalks,
- rose trellises, brick walls, roof shingles, and golf greens. All of these
- are flat wraps. To be honest, I haven't tried infinite tiled wrap wraps...
- I'm not sure what they'd do!
-
- Placing repeating brushmaps is just the same as a regular flat wrap. The
- size of the brush is determinedthe X and Z axis, and the "depth of
- influence" is determinedthe Y axis.
-
- One additional option that is very useful is the "mirror" option. This makes
- every tile be a mirror reflection of its neighbor. The great advantage of
- this is that the edge colors ALWAYS match, just like if your finger touches
- a mirror, your twin in the mirror will reach out and touch your finger at
- the exact same place. This might hide discontinuities in your brushmap if
- you want to hide the seams, or it might be a special effect you're looking
- for.
-
- Repeating brushmaps aren't just for covering an infinite plain with your
- face. They can be an extremely powerful way to get very complex textures on
- an object. You can imagine drawing one very high resolution, high quality
- brick with scratches, pits, chips and tiny detail, then tiling it onto a
- wall. Presto! You have a brick wall with a lot of character, unlike the
- Brick texture which is too plain to fool anyone up close. This is probably
- the most useful aspect of infinite tilings. You can find my infinite
- sidewalk, infinite golf green, infinite brick wall (very nice!) and infinite
- rose trellis on ab20 and hubcap.
-
- When I refer to "ab20" and "hubcap" I mean the anonymous FTP sites
- ab20.larc.nasa.gov and hubcap.clemson.edu, both of which have a lot of
- Imagine files, objects, brush maps and goodies that I've uploaded. There is
- also an archive of this list on both sites. If you need to know if you have
- FTP access and how to use it, ask one of your local computer experts- they
- should be able to help you.
-
- The last brush map ability is very useful. You can actually have ANIMATED
- brush maps which change every frame. Note that these pictures are not
- "AnimBrushes" that DPaint will save. These are individual pictures, which
- means you can have a 24 bit "animbrush." To use this feature, you should
- save the sequence of pictures you wish to show in a format like
-
- Mypic.0001
- Mypic.0002
- Mypic.0003
- Mypic.0004
- Mypic.0005
-
- and so on up to however many pictures you have. Make sure to have FOUR
- numbers in the extension. Mypic.01 will NOT work. To use this sequence of
- pictures as an animation, you should use "Mypic" as the brush file name
- [without the quotes], then set the "Max sequence #" to the number of
- pictures you have. I wrote a LONG article about how you can make animations
- of yourself using Digi-View and a VCR. You might have seen the animation
- with me "trapped" inside of this giant sphere rolling around on a plane,
- with my pitiful attempts to break out recorded in 16 glorious colors. You
- too can do this with YOUR setup. It's worth playing with! You can find the
- article in the Imagine archives on hubcap.
-
- That's all there is to brush maps. They can add a lot of detail to your
- objects, and they're not hard to use if you know how to place the axes. Go
- out and create!
-
-
-
- -Steve "Boy, are my fingers tired" Worley
-
- ---------------------------------------------------------------------------
- Steve Worley spworley@athena.mit.edu
- ---------------------------------------------------------------------------
-
-